from exams.models import Exam
from exams.models import Question
from exams.models import Users
from django.contrib import admin

class ExamAdmin(admin.ModelAdmin):
    fieldsets = [
        (None,               {'fields':['exam_id']}),
        (None,               {'fields':['name']}),
        ('Date information', {'fields': ['date_created']},),
        ('Exams date information', {'fields': ['date_valid'],}),
        ('Exams expired date', {'fields': ['date_expired']},),
        ('Teachers id', {'fields': ['user_id'],}),

    ]
    list_display = ('name', 'date_expired')
admin.site.register(Exam, ExamAdmin)

class UsersAdmin(admin.ModelAdmin):
    fieldsets = [
        (None,               {'fields':['user']}),
        (None,               {'fields':['name']}),
        (None,               {'fields':['uu']}),

    ]
    list_display = ('user', 'name','uu')
admin.site.register(Users, UsersAdmin)

class QuestionAdmin(admin.ModelAdmin):
    fieldsets = [
        (None,               {'fields':['Questions_Number']}),
        (None,               {'fields':['exam_id']}),
        (None,               {'fields':['question_descriptions']}),

    ]
    list_display = ('Questions_Number', 'exam_id','question_descriptions')
admin.site.register(Question, QuestionAdmin)



